package com.jyu.edu.controller.demo;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

@RestController//代表所有映射函数返回值都返回到response
public class DemoController {

	@RequiresPermissions("demoPage_html")//代表需要具备demoPage_html的权限才能访问
	@RequestMapping("/demoPage_html")//映射路径
	public ModelAndView demoPage() {
		//ModelAndView返回的是一个视图（页面），填写viewname以后会返回对应文件的内容
		ModelAndView mv = new ModelAndView();
		mv.setViewName("/demoPage.html");
		return mv;
	}
}
